package com.dimong.loan.sdk.net;

import com.dimong.loan.sdk.app.BaseApplication;
import com.zhy.http.okhttp.OkHttpUtils;

import java.util.Map;

public  class HttpUtil {
    public static void get(String url, Map<String, String> params, NetHttpCallback netHttpCallback) {
        OkHttpUtils.
            get().
            url(url).
            headers(BaseApplication.getApplication().getHttpHeaders()).
            params(params).
            build().
            execute(netHttpCallback);
    }

    public static void post(String url, Map<String, String> params, NetHttpCallback netHttpCallback) {
        OkHttpUtils.
            post().
            url(url).
            headers(BaseApplication.getApplication().getHttpHeaders()).
            params(params).
            build().
            execute(netHttpCallback);
    }
}
